import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static int missingNumber(int[] nums) {
        int count=nums.length;
        int n=count*(count+1)/2;
        int sum=0;
        for(int i=0;i<count;i++){
            sum+=nums[i];
        }

        return n-sum;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //int[] array={0,1};
        ArrayList<Integer> list=new ArrayList<>();
        while(true){
            int num=sc.nextInt();
            if(num==-1)break;

            list.add(num);
        }
        int[] nums=new int[list.size()];
        for(int i=0;i<list.size();i++){
            nums[i]=list.get(i);
        }
        int ret=missingNumber(nums);
        System.out.println(ret);
    }
}
